/**
 * 基金类，基金中包含了股票、国债等
 * @author liaosh
 * @date 2022-10-16 18:58
 */
public class Fund {
    private Stock1 stock1;
    private Stock2 stock2;
    private NationalDebt1 nd1;

    public Fund() {
        stock1 = new Stock1();
        stock2 = new Stock2();
        nd1 = new NationalDebt1();
    }

    /**
     * 统一买入
     */
    public void buy() {
        stock1.buy();
        stock2.buy();
        nd1.buy();
    }

    /**
     * 统一卖出
     */
    public void sell() {
        stock1.sell();
        stock2.sell();
        nd1.sell();
    }
}
